package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectLaborContractEntityMapper;
import com.ly.heart.domain.ProjectLaborContractEntity;
import com.ly.heart.service.IProjectLaborContractEntityService;

/**
 * 项目人力劳动合同明细Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectLaborContractEntityServiceImpl implements IProjectLaborContractEntityService
{
    @Autowired
    private ProjectLaborContractEntityMapper projectLaborContractEntityMapper;

    /**
     * 查询项目人力劳动合同明细
     *
     * @param id 项目人力劳动合同明细主键
     * @return 项目人力劳动合同明细
     */
    @Override
    public ProjectLaborContractEntity selectProjectLaborContractById(String id)
    {
        return projectLaborContractEntityMapper.selectProjectLaborContractById(id);
    }

    /**
     * 查询项目人力劳动合同明细列表
     *
     * @param projectLaborContract 项目人力劳动合同明细
     * @return 项目人力劳动合同明细
     */
    @Override
    public List<ProjectLaborContractEntity> selectProjectLaborContractList(ProjectLaborContractEntity projectLaborContract)
    {
        return projectLaborContractEntityMapper.selectProjectLaborContractList(projectLaborContract);
    }

    /**
     * 新增项目人力劳动合同明细
     *
     * @param projectLaborContract 项目人力劳动合同明细
     * @return 结果
     */
    @Override
    public int insertProjectLaborContract(ProjectLaborContractEntity projectLaborContract)
    {
        projectLaborContract.setCreateTime(DateUtils.getNowDate());
        return projectLaborContractEntityMapper.insertProjectLaborContract(projectLaborContract);
    }

    /**
     * 修改项目人力劳动合同明细
     *
     * @param projectLaborContract 项目人力劳动合同明细
     * @return 结果
     */
    @Override
    public int updateProjectLaborContract(ProjectLaborContractEntity projectLaborContract)
    {
        return projectLaborContractEntityMapper.updateProjectLaborContract(projectLaborContract);
    }

    /**
     * 批量删除项目人力劳动合同明细
     *
     * @param ids 需要删除的项目人力劳动合同明细主键
     * @return 结果
     */
    @Override
    public int deleteProjectLaborContractByIds(String[] ids)
    {
        return projectLaborContractEntityMapper.deleteProjectLaborContractByIds(ids);
    }

    /**
     * 删除项目人力劳动合同明细信息
     *
     * @param id 项目人力劳动合同明细主键
     * @return 结果
     */
    @Override
    public int deleteProjectLaborContractById(String id)
    {
        return projectLaborContractEntityMapper.deleteProjectLaborContractById(id);
    }
}
